'use strict'


module.exports = app => {
    const { router,controller,middleware,io } = app

    const userToken = middleware.userToken(app.config.jwt)

    io.of('/').route('NOTICE',io.controller.default.index)
    io.of('/').route('HAVEREAD',io.controller.default.HaveRead)
    io.of('/').route('CHAT',io.controller.default.Chat)
    io.of('/').route('GETCHAT',io.controllers.default.getChat)
    io.of('/').route('DELCHAT',io.controllers.default.delChat)


    router.get('/qiniutoken',controller.qiniuUpload.token)


    router.post('/user/signUp',controller.user.signUp)
    router.post('/user/signIn',controller.user.signIn)
    router.post('/user/Token',controller.user.Token)
    router.get('/user/search',controller.user.search)
    router.get('/user/people',controller.user.people)
    router.get('/user/attention',userToken,controller.user.attention)
    router.post('/user/Edit',userToken,controller.user.Edit)
    router.get('/user/getDynamic',controller.user.getDynamic)
    router.get('/user/getDynamicApp',controller.user.getDynamicApp)
    router.get('/user/getNotice',userToken,controller.user.getNotice)
    router.get('/user/getNoticeDynamic',userToken,controller.user.getNoticeDynamic)
    router.get('/user/getAttentionPeople',controller.user.getAttentionPeople)
    router.get('/user/getFansPeople',controller.user.getFansPeople)
    router.get('/user/ClearNotice',userToken,controller.user.ClearNotice)


    router.get('/question/getNoReplyQuestion',controller.question.getNoReplyQuestion)
    router.post('/question/create',userToken,controller.question.Create)
    router.get('/question/RecommendList',controller.question.RecommendList)
    router.get('/question/findOne',controller.question.findOne)
    router.post('/question/createReply',userToken,controller.question.createReply)
    router.get('/question/getReply',controller.question.getReply)
    router.post('/question/voters',userToken,controller.question.voters)
    router.get('/question/focus',userToken,controller.question.focus)
    router.get('/question/searchList',controller.question.searchList)
    router.get('/question/PeopleReply',controller.question.PeopleReply)
    router.get('/question/PeopleQuestion',controller.question.PeopleQuestion)
    router.get('/question/RecommendListData',controller.question.RecommendListData)
    router.get('/question/getReplyNin',controller.question.getReplyNin)
    router.post('/question/PeopleAttentionReply',controller.question.PeopleAttentionReply)
    router.get('/question/HotList',controller.question.HotList)


    router.post('/comment/create',userToken,controller.comment.Create)
    router.get('/comment/findComment',controller.comment.findComment)
    router.post('/comment/Like',userToken,controller.comment.Like)
    router.get('/comment/featuredComment',controller.comment.featuredComment)

    router.get('/leaveMessage/getData',controller.leaveMessage.getData)
    router.get('/leaveMessage/create',userToken,controller.leaveMessage.create)
    router.get('/leaveMessage/like',userToken,controller.leaveMessage.like)

}
